{% extends "main_template.html" %}

{% block content %}
{% if future %}
  <h1>Upcoming raids</h1>
    {% for raid in future %}
    <table>
      <tr>
        <th>{{raid.instance.name}}</th>
        <th>{{raid.start_time}}</th>
      </tr>
      {% for raider in raid.raiders %}
        <tr>
          <td colspan="2" style="background-color:#{{raider.character.character_class.hex_colour}}">
            <img src="/media/img/{{raider.character.character_class.icon}}" width="16" height="16"/>
            {{raider.character.name}}
          </td>
        </tr>
      {% endfor %}
     </table>
    {% endfor %}
{% else %}
  <h1>Future raids : stay tuned...</h1>
{% endif %}

{% if past %}
  <h1>Past raids</h1>
    {% for raid in past %}
     <table>
      <tr>
        <th>{{raid.instance.name}}</th>
        <th>{{raid.start_time}}</th>
      </tr>
      {% for raider in raid.raiders %}
        <tr>
        <td colspan="2" style="background-color:#{{raider.character.character_class.hex_colour}}" >
            <img src="/media/img/{{raider.character.character_class.icon}}" width="16" height="16"/>
            {{raider.character.name}}
        </td>
        </tr>
      {% endfor %}
     </table>
    {% endfor %}
{% else %}
  <h1>There are no past raids on record...</h1>
{% endif %}


{% endblock %}